package com.tron.config;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;

/**
 * @description TODO
 * @auther gaoli
 * @create 2019-11-23
 */
@ControllerAdvice
public class FeignExceptionHandler {

    @ResponseBody
    @ExceptionHandler({})
    public Object SocketTimeoutException(Exception e) {
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("code", 50002);
        hashMap.put("message", e.getMessage());
        return hashMap;
    }
}
